* Statistical Routines Used for *
* Caglar Ozden and Eric Reinhardt *
* "The Perversity of Preferences: GSP and Developing Country Trade Policies, 1976-2000" *
* Journal of Development Economics *
* forthcoming *
* Date: Sept 1, 2004 *
* Authors: Caglar Ozden and Eric Reinhardt *
* Note: *
* Because of missing data in the dependent variables and in some covariates, as described in the article, *
* each regression model uses a somewhat different subset of the total observations in this file *
* Models 1, 2, and 3 are the OLS models of Duties, Tariff, and Closure, respectively *
* Models 4, 5, and 6 are the IV models of Duties, Tariff, and Closure, respectively *
* So that those two sets of models draw on exactly the same observations, we estimated *
* the first set, then constrained the second set to run on just the sample used in the first set, *
* and finally re-estimated the first set on just the set of observations used for the second set, as above. *
* The resulting samples are defined by the dummy variables Model1, Model2, Model3 *
* Note also: The auxiliary regressions, Models 7, 8, 9, and 10 in the paper have corresponding *
* sample dummies in this dataset *
des Mod*
* The variable ModelAny, used for the figures, is 1 if the observation is used for any of the paper's regression samples defined as above *
* The paper's regressions also use a 'Trend' variable, which is different for every dependent variable *
* These are 'Trend*' in this file. *
des Trend*
* Model 1 *

newey2 Duties GSPl1 Trend1 IMF LogGDP LogIncome Landlocked Growth if Model1==1, lag(1) i(cnum) t(year) force
* Model 2 *
newey2 Tariff GSPl1 Trend2 IMF LogGDP LogIncome Landlocked Growth if Model2==1, lag(1) i(cnum) t(year) force
* Model 3 *
newey2 Closure GSPl1 Trend3 IMF LogGDP LogIncome Landlocked Growth if Model3==1, lag(1) i(cnum) t(year) force
* Model 4 *
treatreg Duties Trend1 IMF LogGDP LogIncome Landlocked Growth if Model1==1, treat(GSP=GSPl3 Sanctions GrowthUS Trend1 IMF LogGDP LogIncome Landlocked Growth) robust
* Model 5 *
treatreg Tariff Trend2 IMF LogGDP LogIncome Landlocked Growth if Model2==1, treat(GSP=GSPl3 PercentLeft Ally Distance Sanctions GrowthUS Trend2 IMF LogGDP LogIncome Landlocked Growth) robust
* Model 6 *
treatreg Closure Trend3 IMF LogGDP LogIncome Landlocked Growth if Model3==1, treat(GSP=GSPl3 GrowthUS Trend3 IMF LogGDP LogIncome Landlocked Growth) robust
* Model 7 *
newey2 Closure GSPfractionl1 Trend3 IMF LogGDP LogIncome Landlocked Growth if Model7==1, lag(1) i(cnum) t(year) force
* Model 8 *
newey2 Closure Trend3 IMF LogGDP LogIncome Landlocked Growth (GSPfraction=GSPfractionl3 PercentLeft GrowthUS Sanctions) if Model7==1, lag(1) i(cnum) t(year) force
* Model 9 *
* since this is not paired with a matching IV model, it uses the whole eligible sample *
oprobit TRI GSPfractionl1 Trend9 IMF LogGDP LogIncome Landlocked Growth, robust
* Model 10 *
oprobit HF GSPfractionl1 Trend10 IMF LogGDP LogIncome Landlocked Growth, robust
* Table 1 *
su year Duties GSPl1 Trend1 IMF LogGDP LogIncome Landlocked Growth if Model1==1
su year Tariff GSPl1 Trend2 IMF LogGDP LogIncome Landlocked Growth if Model2==1
su year Closure GSPl1 Trend3 IMF LogGDP LogIncome Landlocked Growth if Model3==1
su Closure GSPfractionl1 Trend3 IMF LogGDP LogIncome Landlocked Growth if Model7==1
tab GSPl1 GSP if Model1==1
tab GSPl1 GSP if Model2==1
tab GSPl1 GSP if Model3==1
tab GSPl1 GSP if Model7==1
tab country GSPl1 if Model1==1
tab country GSPl1 if Model2==1
tab country GSPl1 if Model3==1
tab country GSPl1 if Model7==1
* Figure 1 *
graph bar (mean) Duties Tariff Openness if ModelAny==1 & switch==1 & window5==1, over(GSP)
* Figure 2 *
newey2 Duties Trend1 IMF LogGDP LogIncome Landlocked Growth if Model1==1, lag(1) i(cnum) t(year) force
predict partres1 if e(sample), residuals
newey2 Tariff Trend2 IMF LogGDP LogIncome Landlocked Growth if Model2==1, lag(1) i(cnum) t(year) force
predict partres2 if e(sample), residuals
newey2 Closure Trend3 IMF LogGDP LogIncome Landlocked Growth if Model3==1, lag(1) i(cnum) t(year) force
predict partres3 if e(sample), residuals
sort GSPl1
graph bar (mean) partres1 partres2 partres3 if ModelAny==1 & switch==1 & window5==1, over(GSPl1)
by GSPl1: su partres1 partres2 partres3 if ModelAny==1 & switch==1 & window5==1

* Regression Diagnostics Reported in Section 5.1 *
* Heteroscedasticity Testing *
reg Duties GSPl1 Trend1 IMF LogGDP LogIncome Landlocked Growth if Model1==1
whitetst
reg Tariff GSPl1 Trend2 IMF LogGDP LogIncome Landlocked Growth if Model2==1
whitetst
reg Closure GSPl1 Trend3 IMF LogGDP LogIncome Landlocked Growth if Model3==1
whitetst
reg Closure GSPfractionl1 Trend3 IMF LogGDP LogIncome Landlocked Growth if Model7==1
whitetst
* Multicollinearity *
corr Duties GSPl1 Trend1 IMF LogGDP LogIncome Landlocked Growth if Model1==1
corr Tariff GSPl1 Trend2 IMF LogGDP LogIncome Landlocked Growth if Model2==1
corr Closure GSPl1 Trend3 IMF LogGDP LogIncome Landlocked Growth if Model3==1
corr Closure GSPfractionl1 Trend3 IMF LogGDP LogIncome Landlocked Growth if Model7==1
* Compare OLS to GLS *
* Hausman test *
* Model 1 *
reg Duties GSPl1 Trend1 IMF LogGDP LogIncome Landlocked Growth if Model1==1
est store consistent
xtgls Duties GSPl1 Trend1 IMF LogGDP LogIncome Landlocked Growth if Model1==1, i(cnum) t(year) pan(het) corr(psar1) force
est store efficient
hausman consistent efficient
est drop consistent efficient
* Model 2 *
reg Tariff GSPl1 Trend2 IMF LogGDP LogIncome Landlocked Growth if Model2==1
est store consistent
xtgls Tariff GSPl1 Trend2 IMF LogGDP LogIncome Landlocked Growth if Model2==1, i(cnum) t(year) pan(het) corr(psar1) force
est store efficient
hausman consistent efficient
est drop consistent efficient
* Model 3 *
reg Closure GSPl1 Trend3 IMF LogGDP LogIncome Landlocked Growth if Model3==1
est store consistent
xtgls Closure GSPl1 Trend3 IMF LogGDP LogIncome Landlocked Growth if Model3==1, i(cnum) t(year) pan(het) corr(psar1) force
est store efficient
hausman consistent efficient
est drop consistent efficient
* Model 7 *
reg Closure GSPfractionl1 Trend3 IMF LogGDP LogIncome Landlocked Growth if Model7==1
est store consistent
xtgls Closure GSPfractionl1 Trend3 IMF LogGDP LogIncome Landlocked Growth if Model7==1, i(cnum) t(year) pan(het) corr(psar1) force
est store efficient
hausman consistent efficient
est drop consistent efficient

* overid *
* explanatory power *
* exogeneity in 1st place *
* without GSPl3 *
* Section 5.2 IV Diagnostics *
* Results without using GSPl3 as an instrument *
* Model 4 *
treatreg Duties Trend1 IMF LogGDP LogIncome Landlocked Growth if Model1==1, treat(GSP=Sanctions GrowthUS Trend1 IMF LogGDP LogIncome Landlocked Growth) robust
testparm Sanctions GrowthUS, eq(GSP)
predict m if e(sample), xb
gen r=Duties-m if e(sample)
reg r Trend1 IMF LogGDP LogIncome Landlocked Growth Sanctions GrowthUS if Model1==1
di 1503*0.0008
di chi2tail(1,1503*0.0008)
* no overidentification *
drop m r
* Model 5 *
treatreg Tariff Trend2 IMF LogGDP LogIncome Landlocked Growth if Model2==1, treat(GSP=PercentLeft Ally Distance Sanctions GrowthUS Trend2 IMF LogGDP LogIncome Landlocked Growth) robust
testparm PercentLeft Ally Distance Sanctions GrowthUS, eq(GSP)
* adequate explanatory power *
predict m if e(sample), xb
gen r=Tariff-m if e(sample)
reg r Trend2 IMF LogGDP LogIncome Landlocked Growth PercentLeft Ally Distance Sanctions GrowthUS if Model2==1
di 821*0.0034
di chi2tail(4,821*0.0034)
* no overidentification *
* Model 6 *
treatreg Closure Trend3 IMF LogGDP LogIncome Landlocked Growth if Model3==1, treat(GSP=PercentLeft GrowthUS Trend3 IMF LogGDP LogIncome Landlocked Growth) robust
predict m if e(sample), xb
drop m r
predict m if e(sample), xb
gen r=Closure-m if e(sample)
reg r Trend3 IMF LogGDP LogIncome Landlocked Growth PercentLeft GrowthUS if Model3==1
di 2640*0.0014
di chi2tail(1,2640*0.0014)
drop m r
* no overidentification *
quietly treatreg Closure Trend3 IMF LogGDP LogIncome Landlocked Growth if Model3==1, treat(GSP=PercentLeft GrowthUS Trend3 IMF LogGDP LogIncome Landlocked Growth) robust
testparm PercentLeft GrowthUS, eq(GSP)
* adequate explanatory power *
* Model 8 *
newey2 Closure Trend3 IMF LogGDP LogIncome Landlocked Growth (GSPfraction=Ally PercentLeft Sanctions) if Model7==1, lag(1) i(cnum) t(year) force
neweydmexog
quietly ivreg Closure Trend3 IMF LogGDP LogIncome Landlocked Growth (GSPfraction=Ally PercentLeft Sanctions) if Model7==1
overid
* no problem there *
* OVERIDENTIFICATION TESTS for excess instruments in Models 4, 5, 6, and 8 *
* Model 4 *
* AND EXPLANATORY POWER TESTS for instruments in Models 4, 5, 6, and 8 *
* Model 4 *
treatreg Duties Trend1 IMF LogGDP LogIncome Landlocked Growth if Model1==1, treat(GSP=GSPl3 Sanctions GrowthUS Trend1 IMF LogGDP LogIncome Landlocked Growth) robust
testparm GPSl3 Sanctions GrowthUS, eq(GSP)
testparm GSPl3 Sanctions GrowthUS, eq(GSP)
predict m if e(sample), xb
gen r=Duties-m if e(sample)
reg r Trend1 IMF LogGDP LogIncome Landlocked Growth GSPl3 Sanctions GrowthUS if Model1==1
di .0008*1503
di chi2tail(2,.0008*1503)
* no overidentification problem *
* Model 5 *
treatreg Tariff Trend2 IMF LogGDP LogIncome Landlocked Growth if Model2==1, treat(GSP=GSPl3 PercentLeft Ally Distance Sanctions GrowthUS Trend2 IMF LogGDP LogIncome Landlocked Growth) robust
testparm GSPl3 PercentLeft Ally Distance Sanctions GrowthUS, eq(GSP)
* adequate explanatory power *
drop m r
predict m if e(sample), xb
gen r=Tariff-m if e(sample)
reg r Trend2 IMF LogGDP LogIncome Landlocked Growth GSPl3 PercentLeft Ally Distance Sanctions GrowthUS if Model2==1
di .0058*821
di chi2tail(5,.0058*821)
* no overidentification problem *
* Model 6 *
treatreg Closure Trend3 IMF LogGDP LogIncome Landlocked Growth if Model3==1, treat(GSP=GSPl3 GrowthUS Trend3 IMF LogGDP LogIncome Landlocked Growth) robust
drop m r
testparm GSPl3 GrowthUS, eq(GSP)
* adequate explanatory power *
predict m if e(sample), xb
gen r=Closure-m if e(sample)
reg r Trend3 IMF LogGDP LogIncome Landlocked Growth GSPl3 GrowthUS if Model3==1
di .0001*2640
di chi2tail(1,.0001*2640)
* no overidentification problem *
* Model 8 *
newey2 Closure Trend3 IMF LogGDP LogIncome Landlocked Growth (GSPfraction=GSPfractionl3 PercentLeft GrowthUS Sanctions) if Model7==1, lag(1) i(cnum) t(year) force
neweydmexgo
neweydmexog
* validating need for IV model over OLS *
quietly ivreg Closure Trend3 IMF LogGDP LogIncome Landlocked Growth (GSPfraction=GSPfractionl3 PercentLeft GrowthUS Sanctions) if Model7==1
overid
* no overidentification problem *
* Sensitivity Testing: Run Models 4-6 on Just those countries ultimately dropped *
treatreg Duties Trend1 IMF LogGDP LogIncome Landlocked Growth if Model1==1 & switch==1, treat(GSP=GSPl3 Sanctions GrowthUS Trend1 IMF LogGDP LogIncome Landlocked Growth) robust
treatreg Tariff Trend2 IMF LogGDP LogIncome Landlocked Growth if Model2==1 & switch==1, treat(GSP=GSPl3 PercentLeft Ally Distance Sanctions GrowthUS Trend2 IMF LogGDP LogIncome Landlocked Growth) robust

treatreg Closure Trend3 IMF LogGDP LogIncome Landlocked Growth if Model3==1 & switch==1, treat(GSP=Ally Trend3 IMF LogGDP LogIncome Landlocked Growth) robust


* had to change IVs in that last one, because the IVs in Model6 did not have enough explanatory power in this restricted subsample *
exit, STATA clear
